<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>eda12131190311906: Logging.cs Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">eda12131190311906
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">Measure algorithm execution time and report to grafs</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_logging_8cs_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Properties</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Logging.cs</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;﻿</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="keyword">using</span> System;</div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="keyword">using</span> System.IO;</div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="keyword">namespace </span>eda12131190311906</div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;{</div>
<div class="line"><a name="l00016"></a><span class="lineno"><a class="code" href="classeda12131190311906_1_1_logging.html">   16</a></span>&#160;    <span class="keyword">public</span> sealed <span class="keyword">class </span><a class="code" href="classeda12131190311906_1_1_logging.html" title="Loggin class, provide a log model to the application ">Logging</a></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;    {</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">        #region Event</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor"></span>        <span class="keyword">public</span> sealed <span class="keyword">class </span><a class="code" href="classeda12131190311906_1_1_logging_1_1_log_event_args.html" title="Log event hander class ">LogEventArgs</a></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;        {</div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="code" href="classeda12131190311906_1_1_logging_1_1_log_event_args.html#adc2d32e319e432764aa3e0608d57f609">   27</a></span>&#160;            <span class="keyword">public</span> <span class="keywordtype">string</span> <a class="code" href="classeda12131190311906_1_1_logging_1_1_log_event_args.html#adc2d32e319e432764aa3e0608d57f609" title="New text added to log ">AddedText</a> { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="code" href="classeda12131190311906_1_1_logging_1_1_log_event_args.html#af97d20fa61818a1a292daceeec30f546">   32</a></span>&#160;            <span class="keyword">public</span> <span class="keywordtype">bool</span> <a class="code" href="classeda12131190311906_1_1_logging_1_1_log_event_args.html#af97d20fa61818a1a292daceeec30f546" title="Is text write using WriteLine ">IsWriteLine</a> { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="code" href="classeda12131190311906_1_1_logging_1_1_log_event_args.html#afb21057397e1be4d8f4d35f861c4a545">   37</a></span>&#160;            <span class="keyword">public</span> <span class="keywordtype">bool</span> <a class="code" href="classeda12131190311906_1_1_logging_1_1_log_event_args.html#afb21057397e1be4d8f4d35f861c4a545" title="Is text cleared and set to empty ">Cleared</a> { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="code" href="classeda12131190311906_1_1_logging_1_1_log_event_args.html#a2c6a7451ba4040a17649db0b1af3585c">   45</a></span>&#160;            <span class="keyword">public</span> <a class="code" href="classeda12131190311906_1_1_logging_1_1_log_event_args.html#a2c6a7451ba4040a17649db0b1af3585c" title="Constructor ">LogEventArgs</a>(<span class="keywordtype">string</span> text, <span class="keywordtype">bool</span> isWriteLine, <span class="keywordtype">bool</span> cleared)</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;            {</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;                <a class="code" href="classeda12131190311906_1_1_logging_1_1_log_event_args.html#adc2d32e319e432764aa3e0608d57f609" title="New text added to log ">AddedText</a> = text;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;                <a class="code" href="classeda12131190311906_1_1_logging_1_1_log_event_args.html#af97d20fa61818a1a292daceeec30f546" title="Is text write using WriteLine ">IsWriteLine</a> = isWriteLine;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;                <a class="code" href="classeda12131190311906_1_1_logging_1_1_log_event_args.html#afb21057397e1be4d8f4d35f861c4a545" title="Is text cleared and set to empty ">Cleared</a> = cleared;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;            }</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        }</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <span class="keyword">public</span> delegate <span class="keywordtype">void</span> <a class="code" href="classeda12131190311906_1_1_logging.html#a02f9963225992436a66db8f51fcb3515" title="Log event handler delegate ">LogEventHandler</a>(Object sender, LogEventArgs e);</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        <span class="keyword">private</span> <a class="code" href="classeda12131190311906_1_1_logging.html#a02f9963225992436a66db8f51fcb3515" title="Log event handler delegate ">LogEventHandler</a> _log;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        <span class="keyword">public</span> <span class="keyword">event</span> <a class="code" href="classeda12131190311906_1_1_logging.html#a02f9963225992436a66db8f51fcb3515" title="Log event handler delegate ">LogEventHandler</a> <a class="code" href="classeda12131190311906_1_1_logging.html#a4052284ab9f3bcc5175e59083aa320e3" title="Log event, raised when something writes to log ">Log</a></div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="code" href="classeda12131190311906_1_1_logging.html#a4052284ab9f3bcc5175e59083aa320e3">   69</a></span>&#160;        {</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;            add</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;            {</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;                _log += value;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;            }</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;            <span class="keyword">remove</span></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;            {</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;                _log -= value;</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;            }</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;        }</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div>
<div class="line"><a name="l00085"></a><span class="lineno"><a class="code" href="classeda12131190311906_1_1_logging.html#ac2d352ad14753e4215b6d998d2863258">   85</a></span>&#160;        <span class="keyword">protected</span> <span class="keywordtype">void</span> <a class="code" href="classeda12131190311906_1_1_logging.html#ac2d352ad14753e4215b6d998d2863258">OnLog</a>(<a class="code" href="classeda12131190311906_1_1_logging_1_1_log_event_args.html" title="Log event hander class ">LogEventArgs</a> args)</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        {</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;            <span class="keywordflow">if</span> (_log != null)</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;            {</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;                _log(<span class="keyword">this</span>, args);</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;            }</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        }</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;<span class="preprocessor">        #endregion</span></div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;<span class="preprocessor">        #region Properties</span></div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;<span class="preprocessor"></span>        <span class="keyword">public</span> <span class="keywordtype">string</span> <a class="code" href="classeda12131190311906_1_1_logging.html#a0f20d9321ef7e29715cf06841f02c8fb" title="Gets or sets the log header text ">Header</a> { <span class="keyword">get</span>; set; }</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div>
<div class="line"><a name="l00104"></a><span class="lineno"><a class="code" href="classeda12131190311906_1_1_logging.html#ab209d30e5e512102511ca7b3bec2cb14">  104</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">string</span> <a class="code" href="classeda12131190311906_1_1_logging.html#ab209d30e5e512102511ca7b3bec2cb14" title="Gets the string holding log ">LogText</a> { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;<span class="preprocessor">        #endregion</span></div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;<span class="preprocessor">        #region Constructor</span></div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;<span class="preprocessor"></span>        <span class="keyword">public</span> <a class="code" href="classeda12131190311906_1_1_logging.html#a94fc6a81a7119dc7c46d56267569b1d1" title="Constructor ">Logging</a>()</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        {</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;            <a class="code" href="classeda12131190311906_1_1_logging.html#a0f20d9321ef7e29715cf06841f02c8fb" title="Gets or sets the log header text ">Header</a> = <span class="keywordtype">string</span>.Empty;</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        }</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;<span class="preprocessor">        #endregion</span></div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;<span class="preprocessor">        #region Methods</span></div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;<span class="preprocessor"></span>        <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classeda12131190311906_1_1_logging.html#a40c69882ed0d4e70a33c4d6cc1f66a20" title="Write to log ">Write</a>(<span class="keywordtype">string</span> text)</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;        {</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;            <a class="code" href="classeda12131190311906_1_1_logging.html#ab209d30e5e512102511ca7b3bec2cb14" title="Gets the string holding log ">LogText</a> += text;</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;            <a class="code" href="classeda12131190311906_1_1_logging.html#ac2d352ad14753e4215b6d998d2863258">OnLog</a>(<span class="keyword">new</span> LogEventArgs(text, <span class="keyword">false</span>, <span class="keyword">false</span>));</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;        }</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;</div>
<div class="line"><a name="l00131"></a><span class="lineno"><a class="code" href="classeda12131190311906_1_1_logging.html#a0566554e0a1ebff7058684434c71d326">  131</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classeda12131190311906_1_1_logging.html#a0566554e0a1ebff7058684434c71d326" title="Write a new line to log ">WriteLine</a>()</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;        {</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;            <a class="code" href="classeda12131190311906_1_1_logging.html#ab209d30e5e512102511ca7b3bec2cb14" title="Gets the string holding log ">LogText</a> += Environment.NewLine;</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;            <a class="code" href="classeda12131190311906_1_1_logging.html#ac2d352ad14753e4215b6d998d2863258">OnLog</a>(<span class="keyword">new</span> <a class="code" href="classeda12131190311906_1_1_logging_1_1_log_event_args.html" title="Log event hander class ">LogEventArgs</a>(Environment.NewLine, <span class="keyword">true</span>, <span class="keyword">false</span>));</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        }</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;</div>
<div class="line"><a name="l00141"></a><span class="lineno"><a class="code" href="classeda12131190311906_1_1_logging.html#a2d10a4bded3d3ba4031f4721e5bf9563">  141</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classeda12131190311906_1_1_logging.html#a2d10a4bded3d3ba4031f4721e5bf9563" title="Write to log ">WriteLine</a>(<span class="keywordtype">string</span> text)</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;        {</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;            <a class="code" href="classeda12131190311906_1_1_logging.html#ab209d30e5e512102511ca7b3bec2cb14" title="Gets the string holding log ">LogText</a> += text + Environment.NewLine;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;            <a class="code" href="classeda12131190311906_1_1_logging.html#ac2d352ad14753e4215b6d998d2863258">OnLog</a>(<span class="keyword">new</span> <a class="code" href="classeda12131190311906_1_1_logging_1_1_log_event_args.html" title="Log event hander class ">LogEventArgs</a>(text + Environment.NewLine, <span class="keyword">true</span>, <span class="keyword">false</span>));</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;        }</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div>
<div class="line"><a name="l00150"></a><span class="lineno"><a class="code" href="classeda12131190311906_1_1_logging.html#aedbe3f00d101d671425394687f00b638">  150</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classeda12131190311906_1_1_logging.html#aedbe3f00d101d671425394687f00b638" title="Clear log text ">Clear</a>()</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        {</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;            <a class="code" href="classeda12131190311906_1_1_logging.html#ab209d30e5e512102511ca7b3bec2cb14" title="Gets the string holding log ">LogText</a> = <span class="keywordtype">string</span>.Empty;</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;            <a class="code" href="classeda12131190311906_1_1_logging.html#ac2d352ad14753e4215b6d998d2863258">OnLog</a>(<span class="keyword">new</span> <a class="code" href="classeda12131190311906_1_1_logging_1_1_log_event_args.html" title="Log event hander class ">LogEventArgs</a>(<span class="keywordtype">string</span>.Empty, <span class="keyword">false</span>, <span class="keyword">true</span>));</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        }</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div>
<div class="line"><a name="l00161"></a><span class="lineno"><a class="code" href="classeda12131190311906_1_1_logging.html#a11c06be531e9debc85d17e9f7d4821e4">  161</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">bool</span> <a class="code" href="classeda12131190311906_1_1_logging.html#a11c06be531e9debc85d17e9f7d4821e4" title="Write log to a default file (debug.log) ">WriteToFile</a>(<span class="keywordtype">string</span> path)</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;        {</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;            <span class="keywordflow">if</span> (<span class="keywordtype">string</span>.IsNullOrEmpty(path))</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;            {</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;                path = <a class="code" href="classeda12131190311906_1_1_application_settings.html" title="Application settings ">ApplicationSettings</a>.<a class="code" href="classeda12131190311906_1_1_application_settings.html#a5d1d3b6b466afe36d0e1b40483fb8cdf" title="Settings instance ">Instance</a>.<a class="code" href="classeda12131190311906_1_1_application_settings.html#a2a8fe1d0d5f6d3a06097729e89814350" title="Where to save reports to load with gnuplot ">ReportsPath</a>;</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;            }</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;            <span class="keywordflow">if</span> (Program.Logging.IsEmpty())</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;            {</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;                <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;            }</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;            <span class="keywordflow">if</span> (!Directory.Exists(path))</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;            {</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;                Directory.CreateDirectory(path);</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;            }</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;            <span class="comment">// Create file </span></div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;            <span class="keyword">using</span> (TextWriter textWriter = <span class="keyword">new</span> StreamWriter(Path.Combine(path, <span class="stringliteral">&quot;debug.log&quot;</span>)))</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;            {</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;                textWriter.WriteLine(Program.Logging.Header);</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;                textWriter.WriteLine(Program.Logging.LogText);</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;                textWriter.Close();</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;            }</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;        }</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div>
<div class="line"><a name="l00190"></a><span class="lineno"><a class="code" href="classeda12131190311906_1_1_logging.html#ab85ba5075d930053dabe04f5d30b69b5">  190</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classeda12131190311906_1_1_logging.html#ab85ba5075d930053dabe04f5d30b69b5" title="Write log to a default file (debug.log) ">WriteToFile</a>()</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;        {</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;            <a class="code" href="classeda12131190311906_1_1_logging.html#ab85ba5075d930053dabe04f5d30b69b5" title="Write log to a default file (debug.log) ">WriteToFile</a>(null);</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;        }</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        <span class="keyword">private</span> <span class="keywordtype">bool</span> IsEmpty()</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;        {</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;            <span class="keywordflow">return</span> <span class="keywordtype">string</span>.IsNullOrEmpty(<a class="code" href="classeda12131190311906_1_1_logging.html#ab209d30e5e512102511ca7b3bec2cb14" title="Gets the string holding log ">LogText</a>);</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        }</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;<span class="preprocessor">        #endregion</span></div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;<span class="preprocessor"></span>    }</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;}</div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><b>Logging.cs</b></li>
    <li class="footer">Generated on Wed May 29 2013 10:49:09 for eda12131190311906 by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.4 </li>
  </ul>
</div>
</body>
</html>
